//
//  LSZPartyBranchActivitiesManager.m
//  PartyClassCloud
//
//  Created by 梁素珍 on 2018/8/31.
//  Copyright © 2018年 九酷. All rights reserved.
//

#import "LSZPartyBranchActivitiesManager.h"

@implementation LSZPartyBranchActivitiesManager
-(id)initWithPartyBranchActivities:(NSArray *)array
{
    self = [super init];
    if (self) {
        NSMutableArray * mutArrayData = [[NSMutableArray alloc]init];
        for (NSDictionary * dicTion in array) {
            LSZPartyBranchActivitiesMg * mg = [[LSZPartyBranchActivitiesMg alloc]init];
            mg.content = NullStringjudgment(NSStr(dicTion[@"content"]));
            mg.publishTime = NullStringjudgment(NSStr(dicTion[@"publishTime"]));
            NSString * string = [NSString stringWithFormat:@"%@%@",URLTotal,dicTion[@"coverUrl"]];
            mg.coverUrl = NullStringjudgment(string);
            mg.subject = NullStringjudgment(NSStr(dicTion[@"subject"]));
            mg.personNames = NullStringjudgment(NSStr(dicTion[@"personNames"]));
            mg.address = NullStringjudgment(NSStr(dicTion[@"address"]));
            mg.id_id = NullStringjudgment(NSStr(dicTion[@"id"]));
            
            if ([[dicTion allKeys] containsObject:@"catalog"]) {
                NSDictionary * catalogDic = dicTion[@"catalog"];
                if ([[catalogDic allKeys] containsObject:@"name"]) {
                    mg.catalogName = NullStringjudgment(NSStr(catalogDic[@"name"]));
                }
            }else{
                mg.catalogName = @"";
            }
            
            
            [mutArrayData addObject:mg];
        }
        self.arrayData = mutArrayData;
    }
    return self;
}
@end
@implementation LSZPartyBranchActivitiesMg
@end
